package com.lastcode6175.bluetoothremotecontrol

import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.StateFlow

interface BluetoothServiceApi {
    val state: StateFlow<BluetoothConnectionState>
    val availableDevices: StateFlow<List<BluetoothDeviceInfo>>
    val connectedDeviceName: StateFlow<String>
    val errorMessage: StateFlow<String?>
    val permissionRequest: MutableSharedFlow<Array<String>>

    fun checkPermissions(): Boolean
    fun scanDevices()
    fun connectToDevice(deviceInfo: BluetoothDeviceInfo)
    fun sendAsciiKeyPress(key: Char)
    fun sendMouseMove(dx: Int, dy: Int)
    fun sendMouseClick()
    fun sendMouseScroll(amount: Int)
    fun sendDpad(direction: ConsumerControlCode)
    fun sendOkKey()
    fun sendPowerKey()
    fun sendHomeKey()
    fun sendVoiceAssistant()
    fun sendBackKey()
    fun sendVolumeUp()
    fun sendVolumeDown()
    fun sendMute()
    fun sendBackspace()
    fun sendEnter()
    fun clearErrorMessage()
}